Skip to content

feat: add expo-updates support#295

Open
hurali97 wants to merge 39 commits intomainfrom
feat/expo-updates
Open

feat: add expo-updates support#295
hurali97 wants to merge 39 commits intomainfrom
feat/expo-updates

Conversation

@hurali97
Copy link
Copy Markdown
Member

@hurali97 hurali97 commented Apr 9, 2026

Summary

This PR introduces the Expo Updates support to react-native-brownfield APIs and expo config plugin.

iOS:

  • Incorporates the AppController initialization during the applicationDidFinishlaunchingWithOptions.
  • Uses the AppController.shared.launchAssetURL - if it is available
  • In the ReactNativeViewController - inside init() - we do the AppController.start to start the StartupProcedure for Expo Updates.
  • We also set a delegate in init - which returns us whether the AppController started with success.
  • The above piece is important. When we get this protocol invoked, we render the UI.

The major dependency to allow Expo Updates is based on the patch added in this PR. Basically, Expo Updates account for being used in a greenfield App and even for brownfield app with integrated approach.

It does not account for usage in brownfield apps with isolated approach. Hence, the patch included in this PR, Now allows that approach to work as well. This patch needs to be upstreamed to Expo Updates package.


TODO:

  • prepare docs for both iOS and Android
  • fix a bug on SDK54 iOS - where on demand fetch and applying an update does not reflect the UI. The app has to be relaunched.
  • add Android support
  • publish brownfield-gradle-plugin

Test plan

iOS - Apple App
Case: EXUpdatesCheckOnLaunch=NEVER
Never.mp4
Case: EXUpdatesCheckOnLaunch=ALWAYS
Always.mp4
Case: EXUpdatesCheckOnLaunch=NEVER + On demand Fetch
Never+Fetch.mp4

@hurali97 hurali97 changed the title Feat/expo updates feat: add expo-updates support May 8, 2026
@hurali97 hurali97 marked this pull request as ready for review May 8, 2026 10:33
Copilot AI review requested due to automatic review settings May 8, 2026 10:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Expo Updates support across the react-native-brownfield runtime and Expo config plugin, including iOS framework resource wiring, Android module metadata syncing, and repo-local patches needed for isolated brownfield setups.

Changes:

  • Wire Expo Updates bootstrapping on iOS (AppController init/start + launch asset URL usage) and ensure Expo.plist is included in the framework target resources.
  • Add Android support by syncing Expo Updates <meta-data> + referenced string resources from the app module into the generated brownfield library module.
  • Add documentation + example app updates, and ship Yarn patch overrides for expo-updates (SDK 54/55).

Reviewed changes

Copilot reviewed 51 out of 54 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
yarn.lock Adds patched expo-updates resolutions and related dependency entries.
packages/react-native-brownfield/src/expo-config-plugin/template/ios/patchExpoPre55.sh Extends pre-55 Swift patching to cover import EA* modules.
packages/react-native-brownfield/src/expo-config-plugin/template/android/strings.xml New template for generated library string resources.
packages/react-native-brownfield/src/expo-config-plugin/template/android/ReactNativeHostManager.pre55.kt Template placeholders for Expo Updates ReactHost wiring (pre-55).
packages/react-native-brownfield/src/expo-config-plugin/template/android/AndroidManifest.xml Template placeholder for generated library <application> block.
packages/react-native-brownfield/src/expo-config-plugin/ios/xcodeHelpers.ts Adds helpers to create/find a PBX Resources phase and add file refs to it.
packages/react-native-brownfield/src/expo-config-plugin/ios/withBrownfieldIos.ts Hooks Expo.plist resource wiring into the iOS config plugin flow.
packages/react-native-brownfield/src/expo-config-plugin/ios/utils/expo-updates.ts New logic to locate Expo.plist PBXFileReference and ensure it’s in framework resources.
packages/react-native-brownfield/src/expo-config-plugin/ios/tests/expo-updates.test.ts Unit tests for Expo.plist selection and PBX resources wiring behavior.
packages/react-native-brownfield/src/expo-config-plugin/android/withBrownfieldAndroid.ts Adds finalized-mod step to sync Expo Updates metadata after Expo writes Android files.
packages/react-native-brownfield/src/expo-config-plugin/android/withAndroidModuleFiles.ts Generates/updates module manifest + strings from app’s finalized Expo Updates config.
packages/react-native-brownfield/src/expo-config-plugin/android/utils/expo-updates.ts Reads Expo Updates metadata and referenced string resources from the app module on disk.
packages/react-native-brownfield/src/expo-config-plugin/android/utils/androidManifest.ts Adds lightweight XML extraction/render helpers for Android manifest + strings.
packages/react-native-brownfield/src/expo-config-plugin/android/utils/tests/androidManifest.test.ts Tests for metadata extraction, string extraction, and render helpers.
packages/react-native-brownfield/src/expo-config-plugin/android/tests/withAndroidModuleFiles.test.ts Tests for generated library manifest/strings syncing behavior.
packages/react-native-brownfield/ReactBrownfield.podspec Adds EXUpdates CocoaPods dependency when using Expo host mode.
packages/react-native-brownfield/ios/ReactNativeViewController.swift Starts Expo Updates AppController and delays RN view render until updates start callback.
packages/react-native-brownfield/ios/ReactNativeHostRuntime.swift Adds willFinishLaunchingWithOptions forwarding API surface.
packages/react-native-brownfield/ios/ReactNativeBrownfield.swift Exposes application(_:willFinishLaunchingWithOptions:) to forward to host runtime.
packages/react-native-brownfield/ios/ExpoHostRuntime.swift Initializes EXUpdates controller, forwards willFinish/didFinish, uses launch asset URL when available.
packages/brownie/src/index.ts Improves missing-store error message with Kotlin registration example.
packages/brownie/android/src/main/java/com/callstack/brownie/BrownieModule.kt Stops clearing StoreManager during module invalidation.
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/Utils.kt Adds isExpoProject(Project) helper.
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/Constants.kt Allows expo-updates in Expo transitive deps discovery whitelist.
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/processors/VariantProcessor.kt Adds dependency on create<Variant>UpdatesResources for Expo projects.
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNSourceSets.kt Adds Expo updates generated assets directory to source sets.
gradle-plugins/react/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNBrownfieldPlugin.kt Detects Expo projects via utility method and adjusts evaluation ordering.
docs/docs/docs/guides/expo-updates/how-to.mdx New high-level “how to” guide for Expo Updates in brownfield.
docs/docs/docs/guides/expo-updates/expo-55.mdx Manual SDK55 patch guide (Android) and patch reference.
docs/docs/docs/guides/expo-updates/expo-54.mdx Manual SDK54 patch guide (iOS/Android) and patch reference.
docs/docs/docs/guides/expo-updates/_meta.json Adds nav metadata for Expo Updates docs section.
docs/docs/docs/guides/_meta.json Adds Expo Updates docs directory to guides navigation.
apps/ExpoApp55/src/utils/expo-rn-updates.ts Adds helper to check/fetch/reload updates in the example app.
apps/ExpoApp55/src/app/index.tsx Adds UI button to trigger update fetch in the example app.
apps/ExpoApp55/RNApp.tsx Adds UI button to trigger update fetch in RN entry screen.
apps/ExpoApp55/package.json Adds EAS update script and patched expo-updates dependency.
apps/ExpoApp55/entry.tsx Fixes Expo Router context path.
apps/ExpoApp55/app.json Adds updates + runtimeVersion + EAS projectId configuration.
apps/ExpoApp54/utils/expo-rn-updates.ts Adds helper to check/fetch/reload updates in the example app.
apps/ExpoApp54/RNApp.tsx Adds UI button to trigger update fetch in RN entry screen.
apps/ExpoApp54/package.json Adds EAS update script and patched expo-updates dependency.
apps/ExpoApp54/app/(tabs)/index.tsx Adds UI button and updates welcome text.
apps/ExpoApp54/app.json Enables plugin debug + adds updates + runtimeVersion + EAS projectId.
apps/AppleApp/Brownfield Apple App/components/SettingsScreen.swift Formatting-only adjustment.
apps/AppleApp/Brownfield Apple App/components/GreetingCard.swift Formatting-only adjustment.
apps/AppleApp/Brownfield Apple App/BrownfieldAppleApp.swift Forwards willFinishLaunchingWithOptions into ReactNativeBrownfield.
apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo.xcscheme Updates scheme build configuration to “Debug Expo”.
apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj Updates embedded framework references (Brownie.xcframework UUIDs).
apps/AndroidApp/app/src/main/java/com/callstack/brownfield/android/example/MainActivity.kt Minor UI/layout changes + store registration import reorder.
apps/AndroidApp/app/src/expo55/java/com/callstack/brownfield/android/expo/ReactNativeConstants.kt Switches main module name to main for Expo 55 flavor.
apps/AndroidApp/app/src/expo54/java/com/callstack/brownfield/android/expo/ReactNativeConstants.kt Switches main module name to main for Expo 54 flavor.
.yarn/patches/expo-updates-npm-55.0.21-990b55bddd.patch Applies repo-local fixes to Expo Updates SDK55 (Android).
.yarn/patches/expo-updates-npm-29.0.16-1c5c89eb83.patch Applies repo-local fixes to Expo Updates SDK54 (iOS/Android).
.changeset/bright-peaches-fall.md Declares minor version bumps for affected packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/react-native-brownfield/src/expo-config-plugin/ios/withBrownfieldIos.ts Outdated
Comment thread packages/react-native-brownfield/ios/ReactNativeHostRuntime.swift Outdated
Comment thread apps/ExpoApp54/app/(tabs)/index.tsx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants